package com.gg.hj.service;

import com.gg.common.pojo.SysMenus;
import com.gg.common.pojo.SysRoles;
import com.gg.hj.search.SysRolesSearch;

import java.util.List;

public interface SysRolesService {
    /**
     * 查询所有角色
     * @return SysRoles
     * @throws Exception
     */
    SysRolesSearch<SysRoles> queryRoleAllService(SysRolesSearch<SysRoles> sysRolesSearch) throws Exception;

    /**
     * 当前登入账号查询角色具有菜单
     * @return SysMenus
     * @throws Exception
     */
    List<SysMenus> searchQueryUserIdMenuService(int userId) throws Exception;

    /**
     * 根据角色编号查询具有的菜单 授权目标
     * @param roleTagId
     * @return SysRolesSearch
     * @throws Exception
     */
    SysRolesSearch<SysMenus> searchQueryByIdMenuService(int roleTagId) throws Exception;

    /**
     * 授权 或 回收 菜单
     * @param roleId
     * @param check
     * @param nocheck
     * @return
     */
    int AuthorizeOrRecycleMenusService(int roleId,int[] check,int[] nocheck) throws Exception;

    /**
     * 新增角色
     * @return
     * @throws Exception
     */
    int saveRoleService(SysRoles sysRoles) throws Exception;
}
